package com.dynamo.transport.network.practise.channel;

/**
 * @author duanyimiao
 * @create 2018-11-18 6:37 AM
 * @description 状态事件
 **/
public class ChannelStateEvent implements ChannelEvent {

    private ChannelPipeline pipeline;
    private Channel channel;
    //TODO unbind和close状态如何表示？
    private Integer value;

    private ChannelFuture future;

    public ChannelStateEvent() {

    }

    public ChannelStateEvent(ChannelPipeline pipeline, Channel channel,Integer value) {

        this.pipeline = pipeline;
        this.channel = channel;
        this.future = future;
        this.value = value;
    }

    @Override
    public ChannelPipeline getPipelien() {
        return pipeline;
    }

    @Override
    public Channel getChannel() {
        return channel;
    }

    @Override
    public ChannelFuture future() {
        return future;
    }

    public Integer getValue() {
        return value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }
}
